<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>坦克大战 - Tank Battle</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <div class="game-container">
        <canvas id="gameCanvas"></canvas>
        
        <!-- 游戏UI层 -->
        <div class="game-ui">
            <!-- 游戏HUD -->
            <div class="hud">
                <div class="player-stats">
                    <div class="lives">
                        <span class="icon">💚</span>
                        <span id="playerLives">3</span>
                    </div>
                    <div class="health">
                        <span class="icon">❤️</span>
                        <span id="playerHealth">100</span>
                    </div>
                    <div class="missiles">
                        <span class="icon">🚀</span>
                        <span id="playerMissiles">∞</span>
                    </div>
                    <div class="score">
                        <span class="icon">⭐</span>
                        <span id="playerScore">0</span>
                    </div>
                </div>
                <div class="level-info">
                    <span>关卡 <span id="currentLevel">1</span></span>
                </div>
                <div class="enemy-counter">
                    <span class="icon">🎯</span>
                    <span id="enemyCount">10</span>
                </div>
            </div>
            
            <!-- 暂停菜单 -->
            <div id="pauseMenu" class="menu hidden">
                <div class="menu-content">
                    <h2>游戏暂停</h2>
                    <button onclick="game.resume()">继续游戏</button>
                    <button onclick="game.restart()">重新开始</button>
                    <button onclick="game.backToMenu()">返回主菜单</button>
                </div>
            </div>
            
            <!-- 主菜单 -->
            <div id="mainMenu" class="menu">
                <div class="menu-content">
                    <h1>🎮 坦克大战</h1>
                    <div class="menu-buttons">
                        <button onclick="game.startGame()">开始游戏</button>
                        <button onclick="game.showSettings()">设置</button>
                        <button onclick="game.showHighScores()">排行榜</button>
                    </div>
                </div>
            </div>
            
            <!-- AI难度设置菜单 -->
            <div id="aiSettingsMenu" class="menu hidden">
                <div class="menu-content">
                    <h2>🤖 AI难度设置</h2>
                    <div class="difficulty-options">
                        <div class="difficulty-item">
                            <input type="radio" id="easy" name="difficulty" value="easy">
                            <label for="easy">
                                <span class="difficulty-name">简单</span>
                                <span class="difficulty-desc">AI反应迟钝，射击精度低</span>
                            </label>
                        </div>
                        <div class="difficulty-item">
                            <input type="radio" id="normal" name="difficulty" value="normal" checked>
                            <label for="normal">
                                <span class="difficulty-name">普通</span>
                                <span class="difficulty-desc">AI具有基本战术意识</span>
                            </label>
                        </div>
                        <div class="difficulty-item">
                            <input type="radio" id="hard" name="difficulty" value="hard">
                            <label for="hard">
                                <span class="difficulty-name">困难</span>
                                <span class="difficulty-desc">AI智能化，会使用预测射击</span>
                            </label>
                        </div>
                        <div class="difficulty-item">
                            <input type="radio" id="nightmare" name="difficulty" value="nightmare">
                            <label for="nightmare">
                                <span class="difficulty-name">噩梦</span>
                                <span class="difficulty-desc">AI极其智能，团队协作完美</span>
                            </label>
                        </div>
                    </div>
                    <div class="menu-buttons">
                        <button onclick="game.applyAISettings()">应用设置</button>
                        <button onclick="game.backToMainMenu()">返回主菜单</button>
                    </div>
                </div>
            </div>
            
            <!-- 游戏结束菜单 -->
            <div id="gameOverMenu" class="menu hidden">
                <div class="menu-content">
                    <h2>游戏结束</h2>
                    <p>最终得分: <span id="finalScore">0</span></p>
                    <button onclick="game.restart()">重新开始</button>
                    <button onclick="game.backToMenu()">返回主菜单</button>
                </div>
            </div>
        </div>
        
        <!-- 控制说明 -->
        <div class="controls-info">
            <div class="control-hint">
                <span>WASD/方向键: 移动</span>
                <span>空格: 射击</span>
                <span>M键/右键: 导弹</span>
                <span>ESC: 暂停</span>
            </div>
        </div>
    </div>
    
    <!-- 预加载音效 -->
    <audio id="shootSound" preload="auto">
        <source src="assets/sounds/shoot.wav" type="audio/wav">
    </audio>
    <audio id="explosionSound" preload="auto">
        <source src="assets/sounds/explosion.wav" type="audio/wav">
    </audio>
    <audio id="moveSound" preload="auto" loop>
        <source src="assets/sounds/move.wav" type="audio/wav">
    </audio>
    
    <!-- 游戏脚本 -->
    <script src="js/utils/Vector2D.js"></script>
    <script src="js/utils/ParticleSystem.js"></script>
    <script src="js/systems/InputHandler.js"></script>
    <script src="js/systems/AIWorkManager.js"></script>
    <script src="js/systems/collision.js"></script>
    <script src="js/systems/renderer.js"></script>
    <script src="js/buildings.js"></script>
    <script src="js/ai.js"></script>
    <script src="js/Game.js"></script>
    <script src="js/main.js"></script>
</body>
</html> 